﻿
package com.STS.ELearning.Captivate.events{
	
	import flash.events.Event;
	import com.STS.ELearning.Captivate.QuizData;
	
	public class QuestionWidgetEvent extends Event {
		
		public static const CLEAR_ANSWERS:String = "clearAnswers";
		
		public static const ENABLE_ANSWERS:String = "enableAnswers";
		
		public static const DISABLE_ANSWERS:String = "disableAnswers";
		
		public static const SUBMIT:String = "submit";
		
		public static const COMPARE_ANSWERS:String = "compareAnswers";
		
		public static const SET_QUESTION_STATE:String = "setQuestionState";
		
		public static const QUESTION_SUBMITTED:String = "questionSubmitted";
		
		
		private var identity:String = null;
		private var theChosenAnswer:String = null;
		private var theCorrectAnswer:String = null;
		private var theQuestionState:String = null;
		private var _quizData:QuizData;
		
		
		
		
		public function QuestionWidgetEvent (type:String, id:String = null, chosen:String = null, correct:String = null, questionState:String = null, bubbles:Boolean=false, cancelable:Boolean=false, quizData:QuizData = null) {
			identity = id
			theChosenAnswer = chosen;
			theCorrectAnswer = correct;
			theQuestionState = questionState;
			_quizData = quizData;
			
			super(type, bubbles, cancelable);
		}
		
			
		
		override public function clone():Event {
			return new QuestionWidgetEvent(type, answerID, chosenAnswer, correctAnswer, questionState, bubbles, cancelable);
		}
		
		
		
		public function get answerID ():String {
			return identity;
		}
		public function get chosenAnswer ():String {
			return theChosenAnswer;
		}
		public function get correctAnswer ():String {
			return theCorrectAnswer;
		}
		
		public function get questionState ():String {
			return theQuestionState;
		}
		
		public function get quizData():QuizData { return _quizData; }
		
	}
	
}